package managerGUI;

import javax.swing.DefaultListModel;

import managerService.ManagerSystem;
import model.Project;

public class ProjectListModel extends DefaultListModel<Project> {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -2952768012176247094L;

	public ProjectListModel() {
		for (Project project : ManagerSystem.getService().getProjects()) {
			addElement(project);
		}
	}
	
	public void refresh(){
		removeAllElements();
		for (Project project : ManagerSystem.getService().getProjects()) {
			addElement(project);
		}
	}

}
